<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:fragment="header">
    <meta charset="UTF-8">
    <title>STK管理系统</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
        }
        
        .header {
            background-color: #333;
            color: white;
            padding: 1em;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .container {
            display: flex;
            min-height: calc(100vh - 120px);
        }
        
        .menu {
            width: 200px;
            background-color: #f5f5f5;
            padding: 1em;
            border-right: 1px solid #ddd;
        }
        
        .menu ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .menu li {
            margin-bottom: 0.5em;
        }
        
        .menu a {
            color: #333;
            text-decoration: none;
            padding: 0.5em;
            display: block;
        }
        
        .menu a:hover {
            background-color: #e0e0e0;
        }
        
        .content {
            flex-grow: 1;
            padding: 1em;
        }
        
        .footer {
            background-color: #333;
            color: white;
            text-align: center;
            padding: 1em;
        }
    </style>
</head>
<body>
    <div th:fragment="menu">
        <nav class="menu">
            <ul>
                <li><a th:href="@{/}">首页</a></li>
                <li sec:authorize="hasRole('ADMIN')"><a th:href="@{/departments}">单位管理</a></li>
                <li><a th:href="@{/logout}">退出</a></li>
            </ul>
        </nav>
    </div>
</body>
</html>